#!/bin/bash
cd /home/git/aotu_test_git/api-test && git pull -f origin huhu
imageId=`docker images | grep -w api_test_image | awk '{print $3}'`
echo $imageId
if [ -z "${imageId}" ];then
        echo 'wu'
        docker build /home/git/aotu_test_git/api-test -t api_test_image
else
        echo 'you'
        docker rmi $imageId
        docker build /home/git/aotu_test_git/api-test -t api_test_image
fi

